x86: add and use XEN_DOMCTL_getpageframeinfo3
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 13 Jan 2010 08:14:01 +0000 (08:14 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 13 Jan 2010 08:14:01 +0000 (08:14 +0000)
commitb3eb2c1e8b4cf199aa4bf8188685c3059c420a60
treed8eb7d4c8ba276a0f422af101f52ac54aa240781
parent9fececad98aa1259a9896edf7e7931822e3eef87
x86: add and use XEN_DOMCTL_getpageframeinfo3

To support wider than 28-bit MFNs, add XEN_DOMCTL_getpageframeinfo3
(with the type replacing the passed in MFN rather than getting or-ed
into it) to properly back xc_get_pfn_type_batch().

With xc_get_pfn_type_batch() only used internally to libxc, move its
prototype from xenctrl.h to xc_private.h.

This also fixes a couple of bugs in pre-existing code:
- the failure path for init_mem_info() leaked minfo->pfn_type,
- one error path of the XEN_DOMCTL_getpageframeinfo2 handler used
  put_domain() where rcu_unlock_domain() was meant, and
- the XEN_DOMCTL_getpageframeinfo2 handler could call
  xsm_getpageframeinfo() with an invalid struct page_info pointer.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/libxc/xc_domain_save.c
tools/libxc/xc_offline_page.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h
tools/libxc/xenctrl.h
xen/arch/x86/domctl.c
xen/include/public/domctl.h